package com.example.spring_demo.test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author cxx
 * @create 2020-10-26 17:26
 **/
@Component
public class B {

    @Autowired
    private A a;

    @PostConstruct
    public void say() {
        System.out.println ("b: "+a.getName ());
    }
}
